package com.lggry.demo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//家电
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Ele implements Switch{
    private String name;
    private boolean status;

    @Override
    public void press(){
        //控制当前设备开和关
        status = !status;
    }
}
